import {RouteRecordRaw} from "vue-router";
import { shallowRef } from 'vue';

const homeRoute: RouteRecordRaw = {
    path: '/',
    name: "home",
    component: () => import("@/layout/home.vue"),
    children: [
        {
            path: "/:pathMatch(.*)*",
            name: "NotFound",
            component: () => import("@/views/error/404.vue"),
            meta: {
                title: "社区心愿资源丢失了",
            },
        },
        {
            path: "/content",
            name: "Content",
            component: () => import("@/layout/components/index.vue"),
            meta: {
                title: "主资源",
            },
            children: [
                {
                    path: '/wish',
                    name: 'wish',
                    component: () => import('@/views/admin/wish/WishList.vue'),
                    meta: {
                        title: "心愿墙",
                    },
                },
                {
                    path: '/news',
                    name: 'News',
                    component: () => import('@/views/content/News.vue'),
                    meta: {
                        title: "要闻",
                    },
                },
                {
                    path: '/activity',
                    name: 'Activity',
                    component: () => import('@/views/admin/activity/ActivitySettings.vue'),
                    meta: {
                        title: "社区活动",
                    },
                },
                {
                    path: '/volunteer',
                    name: 'Volunteer',
                    component: () => import('@/views/content/Volunteer.vue'),
                    meta: {
                        title: "志愿先锋",
                    },
                },
                {
                    path: '/about',
                    name: 'About',
                    component: () => import('@/views/content/About.vue'),
                    meta: {
                        title: "关于本站",
                    },
                },
                {
                    path: '/activitySettings',
                    name: 'ActivitySettings',
                    component: () => import('@/views/admin/activity/ActivitySettings.vue'),
                    meta: {
                        title: "活动设定",
                    },
                },
                {
                    path: '/wishList',
                    name: 'WishList',
                    component: () => import('@/views/admin/wish/WishList.vue'),
                    meta: {
                        title: "心愿列表",
                    },
                },
                {
                    path: '/carousel',
                    name: 'Carousel',
                    component: () => import('@/views/admin/carousel/Carousel.vue'),
                    meta: {
                        title: "轮播图",
                    },
                },
                {
                    path: '/userList',
                    name: 'UserList',
                    component: () => import('@/views/admin/user/UserList.vue'),
                    meta: {
                        title: "成员管理",
                    },
                },
                {
                    path: '/areaSettings',
                    name: 'AreaSettings',
                    component: () => import('@/views/admin/area/AreaSettings.vue'),
                    meta: {
                        title: "区域设定",
                    },
                },
            ]
        },
    ],
};

export default homeRoute;
